|
找到一个解决的方法,因为js不允许修改<input type="file">这类表单,所以最后的type是没法实现的,现在只有在Selenium RC模式下用*chrome模拟,而core模式要等他们修复bug了。
原文
can't seem to use Selenium Core to upload a file; when I try to type in the file upload text field, nothing happens!
Unfortunately, this is yet another JavaScript security restriction; JS is not allowed to modify the value of <input type="file"> form fields. You can work around this by running your tests under Selenium IDE or under Selenium RC running in the experimental "*chrome" mode for Firefox, but at present there is no way to do this on any other browser. This is filed as bug SEL-63, but there may be no way to fix it in Selenium Core. |
|